import { defineConfig } from "vite";
import { devtools } from '@tanstack/devtools-vite'
import viteTsConfigPaths from 'vite-tsconfig-paths'<% if (tailwind) { %>
import tailwindcss from "@tailwindcss/vite"
<% } %>
import { tanstackStart } from "@tanstack/solid-start/plugin/vite";
import solidPlugin from 'vite-plugin-solid';
<% for(const integration of integrations.filter(i => i.type === 'vite-plugin')) { %><%- integrationImportContent(integration) %>
<% } %>

export default defineConfig({
  plugins: [devtools(), <% for(const integration of integrations.filter(i => i.type === 'vite-plugin')) { %><%- integrationImportCode(integration) %>,<% } %>
    // this is the plugin that enables path aliases
    viteTsConfigPaths({
      projects: ['./tsconfig.json'],
    }),
    <% if (tailwind) { %>tailwindcss(),<% } %>
    tanstackStart(),
    solidPlugin({ ssr: true }),
  ],
})
